/* 实时监控仪表板样式 */

.real-time-dashboard {
  padding: 24px;
  background: #f0f2f5;
  min-height: 100vh;
}

.dashboard-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.dashboard-toolbar h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.metrics-row {
  margin-bottom: 24px;
}

.metrics-row .ant-card {
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.metrics-row .ant-statistic {
  margin-bottom: 8px;
}

.metrics-row .ant-progress {
  margin-top: 8px;
}

.charts-row {
  margin-bottom: 24px;
}

.charts-row .ant-card {
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.alerts-row {
  margin-bottom: 24px;
}

.alerts-row .ant-card {
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

/* 深色主题支持 */
.real-time-dashboard.dark {
  background: #141414;
  color: #ffffff;
}

.real-time-dashboard.dark .dashboard-toolbar {
  background: #1f1f1f;
  color: #ffffff;
}

.real-time-dashboard.dark .ant-card {
  background: #1f1f1f;
  border-color: #303030;
  color: #ffffff;
}

.real-time-dashboard.dark .ant-card-head {
  background: #1f1f1f;
  border-color: #303030;
  color: #ffffff;
}

.real-time-dashboard.dark .ant-card-head-title {
  color: #ffffff;
}

.real-time-dashboard.dark .ant-timeline-item-content {
  color: #ffffff;
}

.real-time-dashboard.dark .ant-form-item-label > label {
  color: #ffffff;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .real-time-dashboard {
    padding: 12px;
  }
  
  .dashboard-toolbar {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  
  .dashboard-toolbar .ant-space {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 576px) {
  .dashboard-toolbar .ant-space {
    flex-direction: column;
    gap: 8px;
  }
  
  .dashboard-toolbar .ant-btn {
    width: 100%;
  }
}

/* 动画效果 */
.ant-card {
  transition: all 0.3s ease;
}

.ant-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* 加载动画 */
.ant-spin-nested-loading > div > .ant-spin {
  max-height: none;
}

/* 统计卡片样式 */
.metrics-row .ant-card-body {
  padding: 20px;
}

.metrics-row .ant-statistic-title {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.metrics-row .ant-statistic-content {
  font-size: 24px;
  font-weight: 600;
}

/* 图表样式 */
.recharts-tooltip {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.dark .recharts-tooltip {
  background: rgba(31, 31, 31, 0.95);
  border-color: #444;
  color: #ffffff;
}

/* 时间线样式 */
.ant-timeline-item-head {
  background: transparent;
}

.ant-timeline-item-tail {
  border-left: 2px solid #f0f0f0;
}

.dark .ant-timeline-item-tail {
  border-left-color: #303030;
}

/* 告警样式 */
.ant-timeline-item-content {
  padding: 8px 0;
}

.ant-timeline-item-content .ant-space {
  align-items: flex-start;
}

.ant-timeline-item-content .ant-btn {
  margin-top: 8px;
}

/* 进度条样式 */
.ant-progress-line {
  margin-bottom: 0;
}

.ant-progress-bg {
  transition: width 0.3s ease;
}

/* 标签样式 */
.ant-badge {
  font-size: 12px;
}

/* 全屏模式 */
.real-time-dashboard:fullscreen {
  padding: 0;
  background: #000;
}

.real-time-dashboard:fullscreen .dashboard-toolbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  border-radius: 0;
}

.real-time-dashboard:fullscreen .metrics-row,
.real-time-dashboard:fullscreen .charts-row,
.real-time-dashboard:fullscreen .alerts-row {
  margin-top: 80px;
}

/* 键盘快捷键支持 */
.real-time-dashboard {
  outline: none;
}

.real-time-dashboard:focus {
  box-shadow: 0 0 0 2px #1890ff;
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
  .real-time-dashboard {
    background: #ffffff;
    border: 2px solid #000000;
  }
  
  .ant-card {
    border: 2px solid #000000;
  }
  
  .ant-btn {
    border: 2px solid #000000;
  }
}

/* 减少动画模式 */
@media (prefers-reduced-motion: reduce) {
  .ant-card,
  .ant-progress-bg,
  .recharts-tooltip {
    transition: none;
  }
}

/* 打印样式 */
@media print {
  .real-time-dashboard {
    background: white;
    padding: 0;
  }
  
  .dashboard-toolbar {
    display: none;
  }
  
  .ant-card {
    border: 1px solid #ddd;
    box-shadow: none;
    page-break-inside: avoid;
  }
  
  .ant-btn {
    display: none;
  }
}

/* 自定义滚动条 */
.real-time-dashboard::-webkit-scrollbar {
  width: 8px;
}

.real-time-dashboard::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.real-time-dashboard::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.real-time-dashboard::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.dark .real-time-dashboard::-webkit-scrollbar-track {
  background: #1f1f1f;
}

.dark .real-time-dashboard::-webkit-scrollbar-thumb {
  background: #444;
}

.dark .real-time-dashboard::-webkit-scrollbar-thumb:hover {
  background: #666;
}